<% if @customer_returns.any? %>
  <div class="card mb-4">
    <div class="card-header">
      <h5 class="card-title"><%= Spree.t(:customer_returns) %></h5>
    </div>
    <div class="card-body">
      <ul class="list-group">
        <% @customer_returns.each do |customer_return| %>
          <li class="list-group-item d-flex justify-content-between align-items-center">
            <span class="text-muted"><%= local_time(customer_return.created_at) %></span>
            <% if customer_return.fully_reimbursed? %>
              <span class="badge  badge-success"><%= Spree.t(:reimbursed) %></span>
            <% else %>
              <span class="badge  badge-inactive"><%= Spree.t(:incomplete) %></span>
            <% end %>
            <span><%= customer_return.display_pre_tax_total.to_html %></span>
            <%= link_to_edit Spree.t(:edit), url: spree.edit_admin_order_customer_return_path(@order, customer_return), class: 'btn btn-light btn-sm' if can?(:edit, customer_return) %>
          </li>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>